//
//  CheckSecondDetailCell.m
//  ICrEAM
//
//  Created by mac on 16/11/11.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "CheckSecondDetailCell.h"

@implementation CheckSecondDetailCell
+(instancetype)createCheckSecondDetailCell{
    return [[[NSBundle mainBundle]loadNibNamed:@"CheckSecondDetailCell" owner:nil options:nil]lastObject];
}
- (IBAction)openImageView:(id)sender {
    if (self.showImageViewBlock) {
        self.showImageViewBlock();
    }
}
- (IBAction)selctBtnClick:(id)sender {
    if (!self.isEdit) {
        return;
    }
    self.aSlectedBtn.selected=! self.aSlectedBtn.selected;
    
    if (self.selectBlock) {
        self.selectBlock(self.indexPath.row-1, self.aSlectedBtn.selected);
    }
}
- (IBAction)actionClick:(UIButton *)sender {
    if (!self.isEdit) {
        return;
    }
    sender.selected=!sender.selected;

    if (self.selectBlock) {
        self.selectBlock(self.indexPath.row-1,sender.selected);
    }
    
}

-(void)setIsSelect:(BOOL)isSelect{
    _isSelect=isSelect;
    self.aSlectedBtn.selected=isSelect;

}
- (void)awakeFromNib {
    [super awakeFromNib];

     self.selectionStyle=UITableViewCellSelectionStyleNone;
    if (![ICrEAMTool isVW]) {
        self.truckShowLabel.textColor=KSKTextTitleColor;
        self.titleL.textColor=KSKBgColor;
        [self.aSlectedBtn setImage:[UIImage imageNamed:@"sk_selected_image"] forState:UIControlStateSelected];
     
    }
    self.contenLabel.hidden=YES;
    self.actionBtn.hidden=YES;
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
